Going Live: Overview
Once a strategy has been backtested and you're ready to run it against real markets, there are two stages to think about: rehearsing it safely, and then deploying it so it keeps running without your laptop being open.
1. Rehearse with paper trading
Before risking real capital (or even before you have exchange API keys at all), run your strategy with Paper Trading enabled. It executes your strategy exactly as it would run live — either against a broker's own sandbox/testnet, or against a local simulator — without ever placing a real order.
2. Deploy to the cloud
The framework includes a CLI tool (iaf) that scaffolds and deploys your project so it can run unattended on a schedule. Two deployment targets are supported out of the box:
- AWS Lambda — Serverless deployment using
boto3, with an S3 bucket for state persistence. - Azure Functions — Serverless deployment using the Azure SDK, with Blob Storage for state persistence.
Both platforms are set up the same way: scaffold a project with iaf init --type <target>, then deploy it with the matching iaf deploy-* command. See the platform-specific pages linked above for prerequisites, commands, and options.
You can also run your bot locally (or on your own server) without any cloud deployment at all — the default and default_web project types generated by iaf init need no cloud credentials:
# Default project (local execution)
iaf init
# Project with a web interface
iaf init --type default_web
This generates:
app.py— Main entry point withcreate_app()andapp.start()strategy.py— ExampleTradingStrategysubclassdata_providers.py— Example data provider setuprequirements.txt— Python dependencies.env.example— Template for environment variables.gitignore— Standard Python gitignore
Next Steps
- Paper Trading — rehearse your strategy risk-free
- Deploying to AWS Lambda
- Deploying to Azure Functions